package YAVMM::Drive;
use Moose;
use MooseX::Storage;

our $VERSION = '0.01';

use YAVMM::Types;

with Storage ('format' => 'JSON');

has 'type' => (
    is        => 'rw',
    isa       => 'Str',
    default   => 'ide',
);

has 'format' => (
    is        => 'rw',
    isa       => 'Str',
    default   => 'qcow2',
);

has 'device' => (
    is        => 'rw',
    isa       => 'Str',
);

has 'media' => (
    is        => 'rw',
    isa       => 'Str',
    default   => 'disk',
);

has 'boot' => (
    is        => 'rw',
    isa       => 'Bool',
    default   => 0,
);

has 'size' => (
    is        => 'rw',
    isa       => 'Str',
    default   => '20G',
);

has 'file' => (
    is        => 'rw',
    isa       => 'Str',
    default   => '',
);

sub TO_JSON { return $_[0]->pack; }

1;
